package com.ruoyi.common.delayQueue;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.util.concurrent.DelayQueue;

/**
 * 延时队列管理
 */
@Slf4j
@Component
public class DelayQueueManager {

    public static DelayQueue<VehicleDataDelayed> vehicleDataDelayQueue = new DelayQueue<>();
    public static DelayQueue<VehiclePicDelayed> vehiclePicDelayQueue = new DelayQueue<>();
    public static DelayQueue<PicIconDelayed> picIconDelayQueue = new DelayQueue<>();
    public static DelayQueue<ScreenCleanUpDelayed> screenCleanUpDelayQueue = new DelayQueue<>();

    public void vehicleDataPut(VehicleDataDelayed delayed) {
        vehicleDataDelayQueue.put(delayed);
    }

    public void vehiclePicPut(VehiclePicDelayed delayed) {
        vehiclePicDelayQueue.put(delayed);
    }

    public void picIconPut(PicIconDelayed delayed) {
        picIconDelayQueue.put(delayed);
    }

    public void screenCleanUpPut(ScreenCleanUpDelayed delayed) {
        screenCleanUpDelayQueue.put(delayed);
    }
}
